package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description: SpecCode
 * @ClassName: com.xframe.domain.e3sp.basedata.SpecCode
 * @Author: lmx
 * @CreateTime: 2023/11/27
 **/
@Data
@Accessors(chain=true)
@XTable(value = "p_t02_specode", label = "SpecCode")
@XSelectItem(keyName = "specodeId",codeName = "speCode",textName = "nameCn")
@XSelectItem(keyName = "specodeId",codeName = "speCode",textName = "nameEn",language = "en")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Variety",foreignKey = "varietyId", targetKey = "varietyId",as = "refVariety")
public class Specode extends BaseModel {

    /**
     * SpecCodeID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "specode_id", primaryKeyFlag = true,desc = "SpecCodeID")
    private Long specodeId;

    /**
     * 品种ID
     */
    @XQueryCondition
    @XColumn(name = "variety_id",desc = "品种ID")
    private Long varietyId;

    /**
     * SPECCODE
     */
    @XQueryCondition
    @XGridTableRef
    @XColumn(name = "spe_code", uniqueFlag = true,desc = "SPECCODE",length = 50)
    private String speCode;


    /**
     * 中文名称
     */
    @XQueryCondition
    @XGridTableRef
    @XColumn(name = "name_cn",desc = "中文名称",length = 200)
    private String nameCn;

    /**
     * 英文名称
     */
    @XColumn(name = "name_en",desc = "英文名称",nullFlag = true,length = 200)
    private String nameEn;


    /**
     * 所属车系
     */
    private Variety refVariety;
}
